$btn-size: 46px;

.gamepad {
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  width: 100%;
  box-sizing: border-box;
  user-select: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  transition: all 0.2s ease;

  .dir-control {
    width: $btn-size * 3;
    height: $btn-size * 3;

    > .row {
      display: flex;
      justify-content: center;

      &:nth-child(2) {
        justify-content: space-between;
      }
    }
  }

  .right {
    display: flex;

    .rotate {
      margin-left: 32px;
    }
  }

  .btn {
    position: relative;
    width: $btn-size;
    height: $btn-size;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1px;
    border: none;
    outline: none;
    background: rgba(0, 0, 0, 0.4);
    box-shadow: inset 0px 0px 6px 0px rgba(0, 0, 0, 1);
    border-radius: 8px;
    transition: all 0.1s ease;
    text-align: center;
    line-height: $btn-size;
    color: orange;
    user-select: none;
    box-sizing: border-box;

    .key {
      display: block;
      position: absolute;
      left: 1px;
      top: 1px;
      width: calc(100% - 4px);
      height: calc(100% - 4px);
      content: ' ';
      box-shadow: 2px 2px 0px 0px rgba(255,255,255,0.8);
      background: rgba(255,255,255,1);
      border-radius: 6px;
      transition: all 0.02s ease-in;
    }

    &:active .key {
      left: 2px;
      top: 2px;
      box-shadow: 0px 0px 0px 0px rgba(255,255,255,0.6);
    }
  }
}